proc addchan {nick otbn1 host handle} {
global botnick home defchanoptions defchanmodes bcast
if {$otbn1 == ""} {
  putquick "NOTICE $nick :\0034ERROR - Invaild Syntax - Should Be - (/msg) $botnick addchan <#channel>"
  return 0
  }
if {($otbn1 == "#bothouse") && (![matchattr $handle n])} {
  putquick "NOTICE $nick :Unable To Execute Command - Cannot add BService channel into channel partition - Permission Denied."
if {$bcast == "1"} {
  putquick "PRIVMSG $home :\002$nick\002 ($host) tried to addchan #BotHouse in my channel partition - a restricted channel."
  }
  return 0
  }
if {[validchan $otbn1]} {
  putquick "NOTICE $nick :\0034ERROR - Channel Currently Exsists - The channel $otbn1 is currently in channel partition."
  return 0
  }
if {[string match "#*" $otbn1]} {
  channel add $otbn1 $defchanmodes 
  putlog "!$nick ($host)! addchan $otbn1"
  putquick "NOTICE $nick :Sucessfully added $otbn1 into channel partition."
if {$bcast == "1"} {
  putquick "PRIVMSG $home :\002$nick\002 ($host) requested me to addchan \002$otbn1\002 into my channel partition."
  }
  channel set $otbn1 -clearbans +enforcebans -dynamicbans +userbans -autoop -bitch +greet -protectops +statuslog -stopnethack -revenge +autovoice -secret -shared +cycle 
  save
  return 0
  }
  putquick "NOTICE $nick :\0034ERROR - Illegal Channel Name - Try adding a # in front of the name (eg. #bot-solutions)"
  return 0
  }









